//
//  XLUserInfo.h
//  XLBaseModule
//
//  Created by 于鹏 on 2017/8/8.
//  Copyright © 2017年 YIVIEW. All rights reserved.
//

#import <Foundation/Foundation.h>
#define UserInfo [XLUserInfo shareUser]

//中心配置
@interface XLServiceInfo : NSObject

/** 服务器地址*/
@property (nonatomic, copy) NSString *serviceAddress;
/** 服务器端口号*/
@property (nonatomic, copy) NSString *port;
/** TCP端口号*/
@property (nonatomic, copy) NSString *tcpPort;
/** 拼接服务器地址*/
@property (nonatomic, copy, readonly) NSString *baseURL;
/** url有效性(是否为空)*/
@property (nonatomic, assign, readonly) BOOL isVaild;

- (instancetype)initWithServiceAddress:(NSString *)serviceAddress port:(NSString *)port tcpPort:(NSString *)tcpPort;

///** 是否连接服务器*/
//@property (nonatomic, assign, readonly)BOOL isServiceConnect;

//+ (XLServiceInfo *)shareServiceInfo;

@end

@interface XLUserInfo : NSObject

/** userID*/
@property (nonatomic, copy) NSString *userID;
/** 用户名*/
@property (nonatomic, copy) NSString *userName;
/** 昵称*/
@property (nonatomic, copy) NSString *nickName;
/** 头像url*/
@property (nonatomic, copy) NSString *userLogo;
/** 手机*/
@property (nonatomic, copy) NSString *phone;
/** 性别*/
@property (nonatomic, copy) NSString *gender;
/** 医院*/
@property (nonatomic, copy) NSString *hospital;
/** 科室*/
@property (nonatomic, copy) NSString *doctorDepartment;
/** 融云token*/
@property (nonatomic, copy) NSString *RYToken;
/** 融云ID*/
@property (nonatomic, copy) NSString *RYID;
/** 融云用户名*/
@property (nonatomic, copy) NSString *RYName;
/** 融云头像*/
@property (nonatomic, copy) NSString *RYLogo;
/** 登录令牌token*/
@property (nonatomic, copy) NSString *tokenCode;

/** 是否登录*/
@property (nonatomic, assign) BOOL isLogin;

/** 是否关闭提示声音 默认:NO*/
@property (nonatomic, assign) BOOL disableMessageAlertSound;
//根据逻辑补充用作推送判断是否返回根控制器
/** 记录当前页面的会诊ID（若不在会诊中则为-1）*/
@property (nonatomic, copy) NSString *enteredID;
//中心配置
@property (nonatomic, strong)XLServiceInfo *serviceInfo;

+ (XLUserInfo *)shareUser;

/** 登出*/
- (void)loginOut;

/** 同步保存*/
- (void)synchronize;

@end



